// let a = 1 
// let b = 1
// console.log('和',a+b);

//4 pick和Omit(内置类型)
type Person = {
  name: string
  age: number 
  genderL:string 
  hobby :string[]
}

//选择一个属性
// type NewPerson = Pick<Person,'name'>
// const p1: NewPerson = {
//   name:'lll'
// }

//排除一些属性
type NewPerson = Omit<Person,'hobby'>
const p2: NewPerson = {
  name: 'xxx',
  age: 18,
  genderL:'ss'
}